
$(document).ready(function()
{
	 var validator = $("#find_pwd_form").validate(
	 {	 
	     rules:{      
		   	email: { required: true, email: true, maxlength: 50},
		   	vcode: { required:true  }
	     },
	     messages:{
	        email: { required:"需要输入电子邮箱", email:"电子邮箱格式不正确", maxlength:'最多输入50个字符'},
	        vcode: { required:"请输入验证码" }
	     },
	     submitHandler: function(form) 
	     {
	    	 return true;
	     }
	 });
		   
	//Function to refresh the validate image
	$("#virefresh").click(function()
	{
		$("#vimg").attr('src', edp_domain_url + 'vcode/?tiny='+Math.random());
	});
});

$(document).ready(function()
{
	function jump(count) 
	{   
		window.setTimeout(function()
		{   
			count--;   
			if(count > 0) 
			{   
				$('#num').attr('innerHTML', count);   
				jump(count);   
			} 
			else 
			{   
				window.location.href=$("#auto_jump_url").val();   
			}   
		}, 1000);   
	};   
			
	if($("#auto_jump_url").size()>0)
		jump(5);
});